15. Data Binding

ANDK L2 47 Data Binding Intro HS-A

A note about the view binding feature (Android Studio 3.6+) and data binding
In this course, we use data binding as a way to access views in a null safe and type safe way. In situations where you only need to access views and not use data binding's more advanced features, you can replace data binding with view binding, which is explained in Lesson 1.

Data binding's more advanced features include ways to write short logical expressions in your XML code, and enhanced functionality with Android Jetpack libraries. You will learn about these more advanced features throughout the course. These features are not available with view binding and because of this, data binding remains an important library to master.

In summary, when using Android Studio 3.6+, when you only need access to views, use view binding. If you need the more advanced features data binding provides, use data binding.

To learn more about how to use view binding in your app, check out the View Binding documentation and the Accessing Views portion of What's new in Architecture Components (Google I/O'19).